package dro.id.gl.engine.Scene;

import dro.id.gl.engine.graphics.SpriteBatch;
import dro.id.gl.engine.graphics.Shader;

public class DroidGLLayer
{
	public static final int 			LAYER_STATIC = 0;
	public static final int 			LAYER_DYNAMIC = 1;
	public static final int 			LAYER_BLEND_NONE = 0;
	public static final int 			LAYER_BLEND_ADD = 1;
	public static final int 			LAYER_BLEND_BLEND = 2;
	
	
	private SpriteBatch m_oSpriteBatch;
	private Shader		m_oShader;
	private int			m_iLayerMode;
	
	public DroidGLLayer(int p_iLayerMode, int p_iLayerBlendMode, Shader p_oShader) {
		
		this.m_oShader = p_oShader;
		this.m_iLayerMode = p_iLayerMode;
		this.m_oSpriteBatch = new SpriteBatch(p_iLayerBlendMode , p_oShader);
	}
	
	public void Update() {
		
		if(this.m_iLayerMode == LAYER_DYNAMIC) {
			
			this.m_oSpriteBatch.RequestBufferUpdate();
		}
		
	}
	
	public SpriteBatch GetSpriteBatch() {
		
		return this.m_oSpriteBatch;
	
	}
	
}
